-- GENERATED SPELL FOR [Rot Hide Plague Weaver] --


function spell0_1940(pUnit, Event) --@Curse of Thule,Self--
pUnit:FullCastSpellOnTarget(3237,pUnit)
pUnit:RegisterEvent('Sorts_1940', 2000, 1)
end

function spell1_1940(pUnit, Event) --@Plague Cloud,n/a--
pUnit:FullCastSpellOnTarget(3256,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1940', 2000, 1)
end

function Sorts_1940(pUnit, Event)
local choix_sorts_1940 = math.random(0, 1)
if choix_sorts_1940 == 0 then
pUnit:RegisterEvent('spell0_1940', 1, 1)
end
if choix_sorts_1940 == 1 then
pUnit:RegisterEvent('spell1_1940', 1, 1)
end
end

function mob1940_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1940', math.random(1500, 3000), 1)
end

function mob1940_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1940_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1940_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1940, 1, 'mob1940_Action')
RegisterUnitEvent(1940, 2, 'mob1940_Leave')
RegisterUnitEvent(1940, 3, 'mob1940_Kill')
RegisterUnitEvent(1940, 4, 'mob1940_Die')
